<%--
  Created by Cweili on 13-9-15.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"  pageEncoding="utf-8"
         trimDirectiveWhitespaces="true" isELIgnored="false" %>
<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
<t:html>
	<t:head />
	<t:body>
		<t:navbar />
		<t:panel>
			<div class="panel-heading">
				<h3>
					${title}管理
					<div class="btn-group">
						<button class="btn btn-primary new" data-toggle="modal" data-target="#editorModal"><t:icon>plus</t:icon></button>
						<button class="btn btn-danger del" onclick="del()"><t:icon>trash</t:icon></button>
					</div>
				</h3>
			</div>
			<t:datatable id="list">
				<th width="28px"><input type="checkbox" class="check-all"></th>
				<th>使用者</th>
				<th>IP地址</th>
				<th>分组</th>
				<th>说明</th>
				<th>使用时间</th>
				<th width="66px"><t:icon>edit</t:icon></th>
			</t:datatable>
		</t:panel>
		<t:editor title="${title}">
			<t:formgroup name="name" label="IP地址">
				<input type="text" class="form-control" id="ip" name="ip" placeholder="必填">
			</t:formgroup>
			<t:formgroup name="ipGroup" label="分组">
				<input type="hidden" id="ipGroup" name="ipGroup">
			</t:formgroup>
			<t:formgroup name="comment" label="说明">
				<textarea class="form-control" id="comment" name="comment" placeholder="IP地址说明" rows="8"></textarea>
			</t:formgroup>
		</t:editor>
		<t:delconfirm name="选中${title}" />
		<t:template id="listTpl">
			<td><input type="checkbox" name="idCheckbox" value="'$id'"></td>
			<td>'$customerName'</td>
			<td>'$ip'</td>
			<td>'$ipGroupName'</td>
			<td>'$commentStr'</td>
			<td>'$startTimeStr'</td>
			<td>'$operatorTemplate'</td>
		</t:template>
		<t:template id="ipGroupBtnTpl">
			<button class="btn btn-default btn-'$id'" onclick="$('#ipGroup').val('$id')">'$name'</button>
		</t:template>
	</t:body>
</t:html>
